<?php

namespace App\Models;
class ProductSnapshot extends Base
{
    protected $table = 'product_snapshots';

    protected $casts = [
        'file_path' => 'array',
    ];

    public function setFilePathAttribute($val) {
        return $this->attributes['file_path'] = json_encode_cn($val);
    }

    public function user() {
        return $this->belongsTo(User::class, 'user_id');
    }

}
